<template>
  <view class="my-container">
    <my-login v-if="!token" />
    <my-userinfo v-else />
  </view>
</template>

<script>
import badge from "@/mixins/badge.js";
import MyLogin from "@/components/my-login.vue";
import MyUserinfo from "@/components/my-userinfo.vue";
import { mapState } from "vuex";
export default {
  components: {
    MyLogin,
    MyUserinfo,
  },
  mixins: [badge],
  computed: {
    ...mapState("user", ["token"]),
  },
};
</script>

<style lang="scss">
page,
.my-container {
  height: 100%;
}
</style>
